#pragma once
#include "stdafx.h"

using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;
using namespace System::Data::Odbc;
using namespace System::Text;
using namespace System::IO;

namespace RPO1 {

	/// <summary>
	/// Summary for Form2
	///
	/// WARNING: If you change the name of this class, you will need to change the
	///          'Resource File Name' property for the managed resource compiler tool
	///          associated with all .resx files this class depends on.  Otherwise,
	///          the designers will not be able to interact properly with localized
	///          resources associated with this form.
	/// </summary>
	public ref class Form2 : public System::Windows::Forms::Form
	{
	public:
		System::String ^fileNo;
		Form2(String ^n)
		{
			InitializeComponent();
			fileNo = n;
			//
			//TODO: Add the constructor code here
			//
		}

	protected:
		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		~Form2()
		{
			if (components)
			{
				delete components;
			}
		}
	private: System::Windows::Forms::Label^  mName2;
	protected: 
	private: System::Windows::Forms::Label^  sName2;
	private: System::Windows::Forms::Label^  address2;
	private: System::Windows::Forms::Label^  nation2;
	private: System::Windows::Forms::Label^  oldPass2;
	private: System::Windows::Forms::Label^  auth2;
	private: System::Windows::Forms::Label^  fName2;
	private: System::Windows::Forms::Label^  pob2;
	private: System::Windows::Forms::Label^  dob2;
	private: System::Windows::Forms::Label^  sex2;
	private: System::Windows::Forms::Label^  hName4;
	private: System::Windows::Forms::Label^  dexpiry2;
	private: System::Windows::Forms::Label^  dissue2;
	private: System::Windows::Forms::Label^  pissue2;
	private: System::Windows::Forms::Label^  oldPass1;
	private: System::Windows::Forms::Label^  auth1;
	private: System::Windows::Forms::Label^  fName1;
	private: System::Windows::Forms::Label^  mName1;
	private: System::Windows::Forms::Label^  address1;
	private: System::Windows::Forms::Label^  nation1;
	private: System::Windows::Forms::Label^  pob1;
	private: System::Windows::Forms::Label^  sName1;
	private: System::Windows::Forms::Label^  hname3;
	private: System::Windows::Forms::Label^  dissue1;
	private: System::Windows::Forms::Label^  dexpiry1;
	private: System::Windows::Forms::Label^  sex1;
	private: System::Windows::Forms::Label^  dob1;
	private: System::Windows::Forms::Label^  pissue1;
	private: System::Windows::Forms::PictureBox^  image;
	private: System::Windows::Forms::Label^  hName2;
	private: System::Windows::Forms::Label^  pNo2;
	private: System::Windows::Forms::Label^  fNo2;
	private: System::Windows::Forms::Label^  hName1;
	private: System::Windows::Forms::Label^  pNo1;
	private: System::Windows::Forms::Label^  fNo1;
	private: System::Windows::Forms::Button^  button1;

	private:
		/// <summary>
		/// Required designer variable.
		/// </summary>
		System::ComponentModel::Container ^components;

#pragma region Windows Form Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		void InitializeComponent(void)
		{
			this->mName2 = (gcnew System::Windows::Forms::Label());
			this->sName2 = (gcnew System::Windows::Forms::Label());
			this->address2 = (gcnew System::Windows::Forms::Label());
			this->nation2 = (gcnew System::Windows::Forms::Label());
			this->oldPass2 = (gcnew System::Windows::Forms::Label());
			this->auth2 = (gcnew System::Windows::Forms::Label());
			this->fName2 = (gcnew System::Windows::Forms::Label());
			this->pob2 = (gcnew System::Windows::Forms::Label());
			this->dob2 = (gcnew System::Windows::Forms::Label());
			this->sex2 = (gcnew System::Windows::Forms::Label());
			this->hName4 = (gcnew System::Windows::Forms::Label());
			this->dexpiry2 = (gcnew System::Windows::Forms::Label());
			this->dissue2 = (gcnew System::Windows::Forms::Label());
			this->pissue2 = (gcnew System::Windows::Forms::Label());
			this->oldPass1 = (gcnew System::Windows::Forms::Label());
			this->auth1 = (gcnew System::Windows::Forms::Label());
			this->fName1 = (gcnew System::Windows::Forms::Label());
			this->mName1 = (gcnew System::Windows::Forms::Label());
			this->address1 = (gcnew System::Windows::Forms::Label());
			this->nation1 = (gcnew System::Windows::Forms::Label());
			this->pob1 = (gcnew System::Windows::Forms::Label());
			this->sName1 = (gcnew System::Windows::Forms::Label());
			this->hname3 = (gcnew System::Windows::Forms::Label());
			this->dissue1 = (gcnew System::Windows::Forms::Label());
			this->dexpiry1 = (gcnew System::Windows::Forms::Label());
			this->sex1 = (gcnew System::Windows::Forms::Label());
			this->dob1 = (gcnew System::Windows::Forms::Label());
			this->pissue1 = (gcnew System::Windows::Forms::Label());
			this->image = (gcnew System::Windows::Forms::PictureBox());
			this->hName2 = (gcnew System::Windows::Forms::Label());
			this->pNo2 = (gcnew System::Windows::Forms::Label());
			this->fNo2 = (gcnew System::Windows::Forms::Label());
			this->hName1 = (gcnew System::Windows::Forms::Label());
			this->pNo1 = (gcnew System::Windows::Forms::Label());
			this->fNo1 = (gcnew System::Windows::Forms::Label());
			this->button1 = (gcnew System::Windows::Forms::Button());
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->image))->BeginInit();
			this->SuspendLayout();
			// 
			// mName2
			// 
			this->mName2->AutoSize = true;
			this->mName2->Location = System::Drawing::Point(497, 313);
			this->mName2->Name = L"mName2";
			this->mName2->Size = System::Drawing::Size(70, 13);
			this->mName2->TabIndex = 80;
			this->mName2->Text = L"Not Available";
			// 
			// sName2
			// 
			this->sName2->AutoSize = true;
			this->sName2->Location = System::Drawing::Point(169, 346);
			this->sName2->Name = L"sName2";
			this->sName2->Size = System::Drawing::Size(70, 13);
			this->sName2->TabIndex = 79;
			this->sName2->Text = L"Not Available";
			// 
			// address2
			// 
			this->address2->AutoSize = true;
			this->address2->Location = System::Drawing::Point(204, 382);
			this->address2->Name = L"address2";
			this->address2->Size = System::Drawing::Size(70, 13);
			this->address2->TabIndex = 78;
			this->address2->Text = L"Not Available";
			// 
			// nation2
			// 
			this->nation2->AutoSize = true;
			this->nation2->Location = System::Drawing::Point(204, 442);
			this->nation2->Name = L"nation2";
			this->nation2->Size = System::Drawing::Size(70, 13);
			this->nation2->TabIndex = 77;
			this->nation2->Text = L"Not Available";
			// 
			// oldPass2
			// 
			this->oldPass2->AutoSize = true;
			this->oldPass2->Location = System::Drawing::Point(204, 477);
			this->oldPass2->Name = L"oldPass2";
			this->oldPass2->Size = System::Drawing::Size(70, 13);
			this->oldPass2->TabIndex = 76;
			this->oldPass2->Text = L"Not Available";
			// 
			// auth2
			// 
			this->auth2->AutoSize = true;
			this->auth2->Location = System::Drawing::Point(204, 516);
			this->auth2->Name = L"auth2";
			this->auth2->Size = System::Drawing::Size(70, 13);
			this->auth2->TabIndex = 75;
			this->auth2->Text = L"Not Available";
			// 
			// fName2
			// 
			this->fName2->AutoSize = true;
			this->fName2->Location = System::Drawing::Point(169, 311);
			this->fName2->Name = L"fName2";
			this->fName2->Size = System::Drawing::Size(70, 13);
			this->fName2->TabIndex = 74;
			this->fName2->Text = L"Not Available";
			// 
			// pob2
			// 
			this->pob2->AutoSize = true;
			this->pob2->Location = System::Drawing::Point(497, 280);
			this->pob2->Name = L"pob2";
			this->pob2->Size = System::Drawing::Size(70, 13);
			this->pob2->TabIndex = 73;
			this->pob2->Text = L"Not Available";
			// 
			// dob2
			// 
			this->dob2->AutoSize = true;
			this->dob2->Location = System::Drawing::Point(169, 278);
			this->dob2->Name = L"dob2";
			this->dob2->Size = System::Drawing::Size(70, 13);
			this->dob2->TabIndex = 72;
			this->dob2->Text = L"Not Available";
			// 
			// sex2
			// 
			this->sex2->AutoSize = true;
			this->sex2->Location = System::Drawing::Point(559, 241);
			this->sex2->Name = L"sex2";
			this->sex2->Size = System::Drawing::Size(27, 13);
			this->sex2->TabIndex = 71;
			this->sex2->Text = L"M/F";
			// 
			// hName4
			// 
			this->hName4->AutoSize = true;
			this->hName4->Location = System::Drawing::Point(226, 241);
			this->hName4->Name = L"hName4";
			this->hName4->Size = System::Drawing::Size(70, 13);
			this->hName4->TabIndex = 70;
			this->hName4->Text = L"Not Available";
			// 
			// dexpiry2
			// 
			this->dexpiry2->AutoSize = true;
			this->dexpiry2->Location = System::Drawing::Point(169, 147);
			this->dexpiry2->Name = L"dexpiry2";
			this->dexpiry2->Size = System::Drawing::Size(70, 13);
			this->dexpiry2->TabIndex = 69;
			this->dexpiry2->Text = L"Not Available";
			// 
			// dissue2
			// 
			this->dissue2->AutoSize = true;
			this->dissue2->Location = System::Drawing::Point(169, 114);
			this->dissue2->Name = L"dissue2";
			this->dissue2->Size = System::Drawing::Size(70, 13);
			this->dissue2->TabIndex = 68;
			this->dissue2->Text = L"Not Available";
			// 
			// pissue2
			// 
			this->pissue2->AutoSize = true;
			this->pissue2->Location = System::Drawing::Point(169, 85);
			this->pissue2->Name = L"pissue2";
			this->pissue2->Size = System::Drawing::Size(70, 13);
			this->pissue2->TabIndex = 67;
			this->pissue2->Text = L"Not Available";
			// 
			// oldPass1
			// 
			this->oldPass1->AutoSize = true;
			this->oldPass1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 10, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->oldPass1->Location = System::Drawing::Point(12, 473);
			this->oldPass1->Name = L"oldPass1";
			this->oldPass1->Size = System::Drawing::Size(163, 17);
			this->oldPass1->TabIndex = 66;
			this->oldPass1->Text = L"Old Passport Number";
			// 
			// auth1
			// 
			this->auth1->AutoSize = true;
			this->auth1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 10, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->auth1->Location = System::Drawing::Point(12, 512);
			this->auth1->Name = L"auth1";
			this->auth1->Size = System::Drawing::Size(129, 17);
			this->auth1->TabIndex = 65;
			this->auth1->Text = L"Issuing Authority";
			// 
			// fName1
			// 
			this->fName1->AutoSize = true;
			this->fName1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 10, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->fName1->Location = System::Drawing::Point(12, 307);
			this->fName1->Name = L"fName1";
			this->fName1->Size = System::Drawing::Size(113, 17);
			this->fName1->TabIndex = 64;
			this->fName1->Text = L"Father\'s Name";
			// 
			// mName1
			// 
			this->mName1->AutoSize = true;
			this->mName1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 10, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->mName1->Location = System::Drawing::Point(344, 309);
			this->mName1->Name = L"mName1";
			this->mName1->Size = System::Drawing::Size(116, 17);
			this->mName1->TabIndex = 63;
			this->mName1->Text = L"Mother\'s Name";
			// 
			// address1
			// 
			this->address1->AutoSize = true;
			this->address1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 10, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->address1->Location = System::Drawing::Point(12, 378);
			this->address1->Name = L"address1";
			this->address1->Size = System::Drawing::Size(150, 17);
			this->address1->TabIndex = 62;
			this->address1->Text = L"Permanent Address";
			// 
			// nation1
			// 
			this->nation1->AutoSize = true;
			this->nation1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 10, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->nation1->Location = System::Drawing::Point(12, 438);
			this->nation1->Name = L"nation1";
			this->nation1->Size = System::Drawing::Size(85, 17);
			this->nation1->TabIndex = 61;
			this->nation1->Text = L"Nationality";
			// 
			// pob1
			// 
			this->pob1->AutoSize = true;
			this->pob1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 10, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->pob1->Location = System::Drawing::Point(344, 276);
			this->pob1->Name = L"pob1";
			this->pob1->Size = System::Drawing::Size(106, 17);
			this->pob1->TabIndex = 60;
			this->pob1->Text = L"Place of Birth";
			// 
			// sName1
			// 
			this->sName1->AutoSize = true;
			this->sName1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 10, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->sName1->Location = System::Drawing::Point(12, 342);
			this->sName1->Name = L"sName1";
			this->sName1->Size = System::Drawing::Size(120, 17);
			this->sName1->TabIndex = 59;
			this->sName1->Text = L"Spouse\'s Name";
			// 
			// hname3
			// 
			this->hname3->AutoSize = true;
			this->hname3->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 10, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->hname3->Location = System::Drawing::Point(12, 237);
			this->hname3->Name = L"hname3";
			this->hname3->Size = System::Drawing::Size(193, 17);
			this->hname3->TabIndex = 58;
			this->hname3->Text = L"Holder\'s Truncated Name\r\n";
			// 
			// dissue1
			// 
			this->dissue1->AutoSize = true;
			this->dissue1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 10, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->dissue1->Location = System::Drawing::Point(12, 110);
			this->dissue1->Name = L"dissue1";
			this->dissue1->Size = System::Drawing::Size(104, 17);
			this->dissue1->TabIndex = 57;
			this->dissue1->Text = L"Date of issue";
			// 
			// dexpiry1
			// 
			this->dexpiry1->AutoSize = true;
			this->dexpiry1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 10, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->dexpiry1->Location = System::Drawing::Point(12, 143);
			this->dexpiry1->Name = L"dexpiry1";
			this->dexpiry1->Size = System::Drawing::Size(109, 17);
			this->dexpiry1->TabIndex = 56;
			this->dexpiry1->Text = L"Date of expiry";
			// 
			// sex1
			// 
			this->sex1->AutoSize = true;
			this->sex1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 10, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->sex1->Location = System::Drawing::Point(506, 237);
			this->sex1->Name = L"sex1";
			this->sex1->Size = System::Drawing::Size(34, 17);
			this->sex1->TabIndex = 55;
			this->sex1->Text = L"Sex";
			// 
			// dob1
			// 
			this->dob1->AutoSize = true;
			this->dob1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 10, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->dob1->Location = System::Drawing::Point(12, 274);
			this->dob1->Name = L"dob1";
			this->dob1->Size = System::Drawing::Size(100, 17);
			this->dob1->TabIndex = 54;
			this->dob1->Text = L"Date of Birth";
			// 
			// pissue1
			// 
			this->pissue1->AutoSize = true;
			this->pissue1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 10, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->pissue1->Location = System::Drawing::Point(12, 81);
			this->pissue1->Name = L"pissue1";
			this->pissue1->Size = System::Drawing::Size(110, 17);
			this->pissue1->TabIndex = 53;
			this->pissue1->Text = L"Place of issue";
			// 
			// image
			// 
			this->image->BackColor = System::Drawing::SystemColors::Control;
			this->image->Location = System::Drawing::Point(425, 27);
			this->image->Name = L"image";
			this->image->Size = System::Drawing::Size(161, 164);
			this->image->TabIndex = 52;
			this->image->TabStop = false;
			// 
			// hName2
			// 
			this->hName2->AutoSize = true;
			this->hName2->Location = System::Drawing::Point(169, 204);
			this->hName2->Name = L"hName2";
			this->hName2->Size = System::Drawing::Size(70, 13);
			this->hName2->TabIndex = 51;
			this->hName2->Text = L"Not Available";
			// 
			// pNo2
			// 
			this->pNo2->AutoSize = true;
			this->pNo2->Location = System::Drawing::Point(169, 57);
			this->pNo2->Name = L"pNo2";
			this->pNo2->Size = System::Drawing::Size(70, 13);
			this->pNo2->TabIndex = 50;
			this->pNo2->Text = L"Not Available";
			// 
			// fNo2
			// 
			this->fNo2->AutoSize = true;
			this->fNo2->Location = System::Drawing::Point(169, 31);
			this->fNo2->Name = L"fNo2";
			this->fNo2->Size = System::Drawing::Size(70, 13);
			this->fNo2->TabIndex = 49;
			this->fNo2->Text = L"Not Available";
			// 
			// hName1
			// 
			this->hName1->AutoSize = true;
			this->hName1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 10, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->hName1->Location = System::Drawing::Point(12, 202);
			this->hName1->Name = L"hName1";
			this->hName1->Size = System::Drawing::Size(145, 17);
			this->hName1->TabIndex = 48;
			this->hName1->Text = L"Holder\'s Full Name\r\n";
			// 
			// pNo1
			// 
			this->pNo1->AutoSize = true;
			this->pNo1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 10, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->pNo1->Location = System::Drawing::Point(12, 53);
			this->pNo1->Name = L"pNo1";
			this->pNo1->Size = System::Drawing::Size(133, 17);
			this->pNo1->TabIndex = 47;
			this->pNo1->Text = L"Passport Number\r\n";
			// 
			// fNo1
			// 
			this->fNo1->AutoSize = true;
			this->fNo1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 10, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->fNo1->Location = System::Drawing::Point(12, 27);
			this->fNo1->Name = L"fNo1";
			this->fNo1->Size = System::Drawing::Size(95, 17);
			this->fNo1->TabIndex = 46;
			this->fNo1->Text = L"File Number\r\n";
			// 
			// button1
			// 
			this->button1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 10, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->button1->Location = System::Drawing::Point(511, 548);
			this->button1->Name = L"button1";
			this->button1->Size = System::Drawing::Size(75, 23);
			this->button1->TabIndex = 45;
			this->button1->Text = L"OK";
			this->button1->UseVisualStyleBackColor = true;
			this->button1->Click += gcnew System::EventHandler(this, &Form2::button1_Click);
			// 
			// Form2
			// 
			this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
			this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
			this->AutoScroll = true;
			this->ClientSize = System::Drawing::Size(609, 583);
			this->Controls->Add(this->mName2);
			this->Controls->Add(this->sName2);
			this->Controls->Add(this->address2);
			this->Controls->Add(this->nation2);
			this->Controls->Add(this->oldPass2);
			this->Controls->Add(this->auth2);
			this->Controls->Add(this->fName2);
			this->Controls->Add(this->pob2);
			this->Controls->Add(this->dob2);
			this->Controls->Add(this->sex2);
			this->Controls->Add(this->hName4);
			this->Controls->Add(this->dexpiry2);
			this->Controls->Add(this->dissue2);
			this->Controls->Add(this->pissue2);
			this->Controls->Add(this->oldPass1);
			this->Controls->Add(this->auth1);
			this->Controls->Add(this->fName1);
			this->Controls->Add(this->mName1);
			this->Controls->Add(this->address1);
			this->Controls->Add(this->nation1);
			this->Controls->Add(this->pob1);
			this->Controls->Add(this->sName1);
			this->Controls->Add(this->hname3);
			this->Controls->Add(this->dissue1);
			this->Controls->Add(this->dexpiry1);
			this->Controls->Add(this->sex1);
			this->Controls->Add(this->dob1);
			this->Controls->Add(this->pissue1);
			this->Controls->Add(this->image);
			this->Controls->Add(this->hName2);
			this->Controls->Add(this->pNo2);
			this->Controls->Add(this->fNo2);
			this->Controls->Add(this->hName1);
			this->Controls->Add(this->pNo1);
			this->Controls->Add(this->fNo1);
			this->Controls->Add(this->button1);
			this->Name = L"Form2";
			this->Text = L"Form2";
			this->Load += gcnew System::EventHandler(this, &Form2::Form2_Load);
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->image))->EndInit();
			this->ResumeLayout(false);
			this->PerformLayout();

		}
#pragma endregion
	private: System::Void Form2_Load(System::Object^  sender, System::EventArgs^  e) {
				 System::String ^str = "dsn=Passport Data;uid=siddhu;pwd=siddhu;";
				 System::Data::Odbc::OdbcConnection ^connection = gcnew System::Data::Odbc::OdbcConnection(str);
				 System::Data::Odbc::OdbcCommand ^command = connection->CreateCommand();
				 System::Data::Odbc::OdbcDataReader ^Reader;
				 command->CommandText = "SELECT * FROM pdata WHERE file_number = '" + fileNo + "'";
				 connection->Open();
				 Reader = command->ExecuteReader();
				 int FileSize = 65 * 1024;
				 System::IO::FileStream ^fs;
				 array<System::Byte, 1> ^rawData;
				 rawData = gcnew array<System::Byte, 1>(FileSize);
				
				 Reader->Read();
				this->fNo2->Text = Reader->GetValue(Reader->GetOrdinal("file_number"))->ToString();
				this->pNo2->Text = Reader->GetValue(Reader->GetOrdinal("passport_no"))->ToString();
				this->hName2->Text = Reader->GetValue(Reader->GetOrdinal("full_name"))->ToString();
                this->hName4->Text = Reader->GetValue(Reader->GetOrdinal("truncated_name"))->ToString();
                this->pissue2->Text = Reader->GetValue(Reader->GetOrdinal("place_issue"))->ToString();
                this->dissue2->Text = Reader->GetValue(Reader->GetOrdinal("date_issue"))->ToString();
                this->dexpiry2->Text = Reader->GetValue(Reader->GetOrdinal("date_expiry"))->ToString();
                this->dob2->Text = Reader->GetValue(Reader->GetOrdinal("dob_yyyymmdd"))->ToString();
                this->pob2->Text = Reader->GetValue(Reader->GetOrdinal("place_of_birth"))->ToString();
                this->sex2->Text = Reader->GetValue(Reader->GetOrdinal("sex"))->ToString();
                this->fName2->Text = Reader->GetValue(Reader->GetOrdinal("father_name"))->ToString();
                this->mName2->Text = Reader->GetValue(Reader->GetOrdinal("mother_name"))->ToString();
                this->sName2->Text = Reader->GetValue(Reader->GetOrdinal("spouse_name"))->ToString();
                this->oldPass2->Text = Reader->GetValue(Reader->GetOrdinal("old_passport_no"))->ToString();
                this->address2->Text = Reader->GetValue(Reader->GetOrdinal("permanent_address"))->ToString();
                this->nation2->Text = Reader->GetValue(Reader->GetOrdinal("nationality"))->ToString();
                this->auth2->Text = Reader->GetValue(Reader->GetOrdinal("issue_auth"))->ToString();
				
				 Reader->GetBytes(Reader->GetOrdinal("portrait_image"), 0, rawData, 0, FileSize);
				 fs = gcnew System::IO::FileStream("FaceImage.jpg", FileMode::OpenOrCreate, FileAccess::Write);
				 fs->Write(rawData, 0, FileSize);
				 fs->Close();
				 this->image->Load("FaceImage.jpg");
				 this->image->SizeMode = System::Windows::Forms::PictureBoxSizeMode::StretchImage;
				 connection->Close();
			 }

private: System::Void button1_Click(System::Object^  sender, System::EventArgs^  e) {
				 this->Close();
		 }
};
}
